<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Categorias
 *
 * @author keoni
 */
class TestClass
{
    public $data;

    function setData(&$data) {
        $this->data =& $data;
    }

    function hasData(&$data) {
        $saved = $data;
        $data = true;
        $result = $this->data === true;
        $data = $saved;
        return $result;
    }

    function isDataOf(&$object) {
        return $object->hasData($this);
    }
}
?>
